3b74c5
@@ -270,7 +270,9 @@
Operator genOPTree(ASTNode ast, PlannerContext plannerCtx) throws SemanticExcept
             LOG.info("CBO Succeeded; optimized logical plan.");
             this.ctx.setCboInfo("Plan optimized by CBO.");
             this.ctx.setCboSucceeded(true);
-            LOG.debug(newAST.dump());
+            if (LOG.isDebugEnabled()) {
+              LOG.debug(newAST.dump());
+            }
           }
         } catch (Exception e) {
           boolean isMissingStats = noColsMissingStats.get() > 0;
